From: jenkins-bot Date: Fri, 13 Apr 2018 03:36:24 +0000 (+0000) Subject: Merge "Default installations to using RemexHtml for tidying" X-Git-Tag: 1.31.0-rc.0~89 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=c23c2b1c53824311bed3987d07bc0653aee6450e;hp=693e9b2728d910c3c32affd2013f755fe22e03e3;p=lhc%2Fweb%2Fwiklou.git Merge "Default installations to using RemexHtml for tidying" --- diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index ea3aa8bd3c..052bc8223a 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -31,6 +31,10 @@ production. * (T188472) The 'comma' value for $wgArticleCountMethod is no longer supported for performance reasons, and installations with this setting will now work as if it was configured with 'any'. +* (T185753) MediaWiki now defaults to using RemexHtml to tidy up user input, rather than + being off by default. If you wish to disable HTML tidying entirely, set $wgTidyConfig + to null; if you wish to use the old, deprecated Tidy external binary, both + set $wgTidyConfig to null and also set $wgUseTidy to true. * $wgLogAutopatrol now defaults to false instead of true. * $wgValidateAllHtml was removed and will be ignored. diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 22f587ee15..a0f849e43a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4264,8 +4264,9 @@ $wgAllowImageTag = false; /** * Configuration for HTML postprocessing tool. Set this to a configuration - * array to enable an external tool. Dave Raggett's "HTML Tidy" is typically - * used. See https://www.w3.org/People/Raggett/tidy/ + * array to enable an external tool. By default, we now use the RemexHtml + * library; historically, Dave Raggett's "HTML Tidy" was typically used. + * See https://www.w3.org/People/Raggett/tidy/ * * If this is null and $wgUseTidy is true, the deprecated configuration * parameters will be used instead. @@ -4286,7 +4287,7 @@ $wgAllowImageTag = false; * - tidyBin: For RaggettExternal, the path to the tidy binary. * - tidyCommandLine: For RaggettExternal, additional command line options. */ -$wgTidyConfig = null; +$wgTidyConfig = [ 'driver' => 'RemexHtml' ]; /** * Set this to true to use the deprecated tidy configuration parameters. diff --git a/tests/phpunit/includes/parser/TidyTest.php b/tests/phpunit/includes/parser/TidyTest.php index 62b84aa129..be5125c7e3 100644 --- a/tests/phpunit/includes/parser/TidyTest.php +++ b/tests/phpunit/includes/parser/TidyTest.php @@ -55,8 +55,8 @@ MathML; ' should survive tidy' ], [ 'foo', 'foo', ' should survive tidy' ], - [ "\nfoo", 'foo', ' should survive tidy' ], - [ "\nfoo", 'foo', ' should survive tidy' ], + [ "foo", 'foo', ' should survive tidy' ], + [ "foo", 'foo', ' should survive tidy' ], [ $testMathML, $testMathML, ' should survive tidy' ], ]; }